<?php
class AdminService extends BaseService {
	
	public function getEmployees(){
		$employeeManager = new EmployeeManager();
		$employeeManager->getEmployees();
		return $employeeManager->getResult();
	}
	
	public function getBranches(){
		$lookupManager = new LookupManager();
		$lookupManager->getBranchList();
		return $lookupManager->getResult(); 
	}
	
	public function getPositions(){
		$lookupManager = new LookupManager();
		$lookupManager->getPositionList();
		return $lookupManager->getResult();
	}
	
	public function getStatus(){
		$lookupManager = new LookupManager();
		$lookupManager->getStatusList();
		return $lookupManager->getResult();
	}
	
	public function getEmployeeById($employeeId){
		$employee = new Employee_Domain();
		$employee->setEmployeeId($employeeId);
		
		$employeeManager = new EmployeeManager();
		$employeeManager->setObj($employee);
		$employeeManager->getEmployeeById();
		return $employeeManager->getResult();
	}
	
	public function updateEmployee($employee){
		$employeeManager = new EmployeeManager();
		$employeeManager->setObj($employee);
		$employeeManager->update();
		return $employeeManager->getResult();
	}
	
	public function saveEmployee($employee){
		$employeeManager = new EmployeeManager();
		$employeeManager->setObj($employee);
		$employeeManager->add();
		return $employeeManager->getResult();
	}
	
	public function updateAccount($employee){
		$employeeManager = new EmployeeManager();
		$employeeManager->setObj($employee);
		$employeeManager->updateAccount();
		return $employeeManager->getResult();
	}
	
}